const allModes = [
  'eval',
  'cheap-eval-source-map',
  'cheap-module-eval-source-map',
  'eval-source-map',
  'cheap-source-map',
  'cheap-module-source-map',
  'inline-cheap-source-map',
  'inline-cheap-module-source-map',
  'source-map',
  'inline-source-map',
  'hidden-source-map',
  'nosources-source-map'
]
const path = require('path');
/**
 * @type {import('webpack').Configuration}
 */
module.exports = allModes.map(mode => {
  return {
    mode: 'none',
    entry: './src/main-devtool.js',
    output: {
      path: path.join(__dirname, 'dist1'),
      filename: `js/${mode}.js`
    },
    devtool: mode,
    module: {
      rules: [
        {
          test:/\.js$/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env']
            }
          }
        }
      ]
    }
  }
})